import React, { createRef, useRef } from 'react'

export default function UseRef() {
    const btn = createRef()
    // const btn = useRef()

    function handleClick() {
        console.log(btn.current)
    }

    return (
        <div>
            <button ref={btn} onClick={handleClick}>click</button>
        </div>
    )
}
